#!/bin/bash
#
# 简要描述您的脚本
# 版权 2022 mousycoder
# chkconfig: 345 90 10

start() {
  echo "starting service...."
  sleep 1
  echo "started the service"
}

stop() {
  echo "stopping service...."
  sleep 1
  echo "stopped the service"
}

restart() {
  echo "restarting service...."
  sleep 1
  echo "restarted the service!"
}

other() {
  echo "warning:invalid option -> ${1}"
}

function main() {
  case $1 in
    start)
      start
      ;;
    stop)
      stop
      ;;
    restart)
      restart
      ;;
    *)
      other
      ;;
  esac

}

main "$@"
